<?php

// Init owncloud

require_once(OC::$SERVERROOT."/apps/resumes//lib/helper.php");
require_once(OC::$SERVERROOT."/apps/company//lib/thirdaccounts.php");

if(!OC_User::isLoggedIn()) {
   echo '您需要先登录'; 
   exit;
}

$thirdModel = new PCompanyModelThirdAccounts();
$sync_info = $thirdModel->getCompanyThirdToolsInfo();
$thirdaccounts_info = !empty($sync_info['login']) ? json_decode($sync_info['login'],true) : null;
$thirdaccounts_status = !empty($sync_info['status']) ? json_decode($sync_info['status'],true) : null;

$tmpl = new OCP\Template('resumes', 'part.importresumes', '');
$tmpl->assign('thirdaccounts_info',$thirdaccounts_info);
$tmpl->assign('thirdaccounts_status',$thirdaccounts_status);

$tmpl->printPage();
